package shizhan.proxy;

import java.lang.reflect.Proxy;

public class CalculatorInvoationHandlerFactory {

    public static <T> T create(Object target,String methodName){
        CalculatorJDK jdk = new CalculatorJDK(target,methodName);

        return (T) Proxy.newProxyInstance(jdk.getClass().getClassLoader(),
                target.getClass().getInterfaces(),jdk);
    }



}
